<?php
$count = 0;
function archiv_zip_reader($path, $fs)
{
  global $count;
  $count++;  
  //echo "<h1>$count</h1>";
  foreach($fs as $e=>$f) {
    if($f[1] == "dir") {
      //print_r($f[2]);
      $f[2] = archiv_zip_reader($path.DS.$f[0].DS, $f[2]);
    } else {
      if(strpos($f[0], "zip") !== false) {
        $f[1] = "zipdir";
      }
    }
    $fs[$e] = $f;
  }
  return $fs;
}
?>